package com.hqyj.nacosdemo.consumer.controller;

import com.hqyj.nacosdemo.consumer.repository.ProviderClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {

    @Autowired
    ProviderClient providerClient;

    @GetMapping("/goods/catalog")
    public String itemsCatalogList(@RequestParam(value = "catalogName",required = true,defaultValue = "all") String catalogName){return providerClient.queryItemsListByCatalogName(catalogName);}
}
